// components/orderCard.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isEsasy:{
      type:Boolean,
      value:false
    },
    orderId:{
      type:String,
      value:null
    },
    type:{
      type:String,
      value:""
    },
      icon:{
        type:String,
        value:""
      },
      address:{
        type:String,
        value:""
      },
      status:{
        type:String,
        value:"待处理"
      },
      time:{
        type:String,
        value:"2020-04-01"
      },
      rank:{
        type:String,
        value:"12"
      },
      weight:
      {
        type:String,
        value:"12kg"
      },
      category:{
        type:String,
        value:''
      },
      place:{
        type:String,
        value:''
      },
      addrNo:{
        type:String,
        value:''
      },
      items:{
        type:String,
        value:''
      },
      senderDateBegin:{
        type:String,
        value:''
      },
      senderDateEnd:{
        type:String,
        value:''
      },
      senderRemark:{
        type:String,
        value:''
      }
  },

  /**
   * 组件的初始数据
   */
  data: {
    showShare:false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoOrderDetail()
    {
      const {type,orderId} = this.data
      wx.navigateTo({
        url: `../../pages/order/orderDetail/index?type=${type}&orderId=${orderId}`,
      })
    },
    gotoevaluation()
    {
      // console.log(this.data.orderId)
      const orderId = this.data.orderId
      wx.navigateTo({
        url: `/pages/order/orderEvaluation/index?orderId=${{orderId}}`,
      })
    },
    shareOrderTrigger()
    {
      // const showShare = this.data.showShare
      // console.log(showShare)
      // console.log(this)
      const orderId = this.data.orderId
      const type = this.data.type
      // console.log(type)
      this.triggerEvent('shareOrder', { "showShare":true,"curShareOrderId":orderId,"curShareOrderType":type});
      // this.setData({
      //   showShare:!showShare
      // })
    }
  }
})
